<?php
final class NameFactory
{
    public static function Create($name,$params=NULL)
    {
        $className='Name_'.ucfirst($name);
        $object=NULL;
        if($params){
            $object=new $className($params);
        }
        else{
            $object=new $className;
        }
        return $object;
    }
}
?>
